<g:each in="${instanceList}" status="i" var="instance">
    <tr class="${(i % 2) == 0 ? 'odd' : 'even'} ${indent==1?'topColumn' : ''}">
        <td><g:each in="${1..indent}">　</g:each><g:link action="list" id="${instance.id}">${fieldValue(bean: instance, field: "name")}</g:link></td> 
        <td>${fieldValue(bean: instance, field: "description")}</td>
        <td>${fieldValue(bean: instance, field: "sequencer")}</td>
        <td>${instance.children?.size()}</td> 
        <td class="operate">
        <x:operate width="200">
            <g:link  action="edit" id="${instance.id}"><g:message code="default.button.edit.label" default="修改" /></g:link>
            <g:link  action="delete" id="${instance.id}" onclick="return confirm('${message(code: 'default.button.delete.confirm.message', default: 'Are you sure?')}');"><g:message code="default.button.delete.label" default="delete" /></g:link>
            <g:link  action="create" id="${instance.id}">添加子栏目</g:link>
        </x:operate>
        </td> 
    </tr>
    <g:if test="${instance?.children}">
        <g:render template="index_tree" model="[instanceList : instance?.children  , indent : indent+1]"/>
    </g:if>
</g:each>